package com.bafa.front.admin;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.bafa.exceptions.ErrorException;
import com.bafa.front.DaddyServlet;
import com.bafa.services.AdminServices;

public class AddTeamServlet extends AdminServlet {

	@Override
	public void doAdminEvent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ErrorException {
		
		String name = request.getParameter("name");
		String contactName1 = request.getParameter("contactName1");
		String contactName2 = request.getParameter("contactName2");
		String contactTel1 = request.getParameter("contactTel1");
		String contactTel2 = request.getParameter("contactTel2");
		String contactEmail1 = request.getParameter("contactEmail1");
		String contactEmail2 = request.getParameter("contactEmail2");
		String shirtColour = request.getParameter("shirtColour");
		
		message = AdminServices.addNewTeam(name,contactName1,contactName2,contactEmail1,contactEmail2,contactTel1,contactTel2,shirtColour);
		url = "logon.bafa";
	}
}
